home *** CD-ROM | disk | FTP | other *** search
- Path: news.th-darmstadt.de!news
- From: Enno Sandner <enno@intellektik.informatik.th-darmstadt.de>
- Newsgroups: comp.lang.c++
- Subject: Re: [Q] Why doesn't this compile?
- Date: Thu, 18 Apr 1996 09:18:03 +0200
- Organization: Fachbereich Informatik, TH Darmstadt
- Message-ID: <3175ECAB.167EB0E7@intellektik.informatik.th-darmstadt.de>
- References: <317523C0.5042@eps.agfa.be>
- NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (X11; I; SunOS 4.1.3 sun4m)
-
- Ranko Orlic wrote:
- >
- > Using MSVC 4.0 compiler I get the following:
- >
- > File test.cpp: ---------------------------------
- >
- > class A {
- > public:
- > class L {
- > public:
- > L() {}
- > virtual void f() {
- > int dummy = 0;
- > }
- > };
- > A();
- > };
- >
- > class B : public A {
- > class L : public A::L {
- > public:
- > L() {}
- > virtual void f() {
- > A::L::f();
- > }
- > };
- > B();
- > };
- >
- > Compilation result: ----------------------------
- >
- > test.cpp(18) : error C2352: 'A::L::f' : illegal call of
- > nonstatic member function
- > Error executing cl.exe.
- > test.obj - 1 error(s), 1 warning(s)
- >
- > ------------------------------------------------
- >
- > Anybody knows what's wrong with it?
-
- I would say nothing - the given example should compile.
-
- Enno
-